#include "stdafx.h"
#include "queue.h"
#include "object.h"
#include "timer.h"
#include "message.h"
#include "master.h"
#include "hero.h"
#include "display.h"
#include "cube.h"
#include "Keyboard.h"

#include "terminator.h"
#include "data.h"
// for memory leaks finding
#include <debug_new.h>
//



int main(int argc, char* argv[])
{
/*
	CArray2D* abc = new CArray2D(5,4);
	CData* def = abc;
	CArray2D* disp = dynamic_cast<CArray2D*>(def);
	cout << disp->getXsize() << endl;
*/
	CQueueParser parser;
	
	parser.addObject("Timer",		make_shared<CTimer>());
	parser.addObject("Master",		make_shared<CMaster>());
	parser.addObject("Hero",		make_shared<CHero>());
	parser.addObject("Cube",		make_shared<CCube>());
	parser.addObject("Keyboard",	make_shared<CKeyboard>());
	parser.addObject("Display",		make_shared<CDisplay>());
	parser.addObject("Terminator",	make_shared<CTerminator>(20));

	vector<Message> mv;
	Message m("Parser","All",MSG_INIT);
	mv.push_back(m);

	parser.parse(mv);

	system("cls");
	return 0;
}